#!/bin/bash

#设备搜索响应
gnome-terminal --window "dev_ser_rep" -- bash -c "sudo ./dev_ser_rep/project/test;exec bash"

echo "超过10秒后仍没连接上客户端，请关闭所有进程，并重新执行此脚本"
sleep 10

#数据上报
gnome-terminal --window "data_report" -- bash -c "cd ./data_report;sudo ./data_report;exec bash"

sleep 2
#modbus采集
gnome-terminal --window "modbus" -- bash -c "sudo ./mb_dev/test;exec bash"

sleep 2
#stm32采集
gnome-terminal --window "stm32" -- bash -c "sudo ./mcu/stm32/test;exec bash"

sleep 2
#阿里云
gnome-terminal --window "aliyun" -- bash -c "sudo ./aliyun_report/LinkSDK/output/data-model-basic-demo;exec bash"

sleep 2
#Web服务器
gnome-terminal --window "web" -- bash -c "sudo ./http_server/thttpd-master/thttpd.out;exec bash"

sleep 2
#视频流
gnome-terminal --window "mjpeg" -- bash -c "cd ./mjpg-streamer;sudo ./mjpg_streamer -i "./input_uvc.so" -o "./output_udp.so -p 8888" -o "./output_http.so -w ./www";exec bash"
